package http;

import javax.servlet.annotation.WebServlet;
import java.io.IOException;

@WebServlet({"/hello", "/h"})
public class HelloServlet extends HttpServlet {
    @Override
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
        response.setContentType("text/html;charset=utf-8");

        String name = request.getParameter("name");
        if(name != null){
           response.getWriter().write("Hello " + name);
        }else {
           response.getWriter().write("hello" + "=====");
        }
    }
}
